﻿@model List<BostonAzureSite.ViewModels.EventsViewModel>
@using BostonAzureSite.ViewHelpers;
           
@{
    ViewBag.Title = "Upcoming Events : Boston Azure User Group";
}
<div class="content">
    <a href="/Events">Show all events</a>

    <div class="events">
    @if (Model.Count > 0)
    {
        <table>
            <tr>
                <th>Title</th><th>Description</th><th>Starts<div>(EST/Boston)</div></th><th>Ends<div>(EST/Boston)</div></th>
            </tr>	
            @foreach (var item in Model) { 
                @* TODO:Need to add class='last' on the last event *@
                <tr>
                    <td class="green">@item.Title</td>
                    <td>
    				    @item.DescriptionHtml
                    </td>
                    <td class="green">@Html.GetLocalDateTimeSemanticMarkup(item.StartTimeUtc)</td>
                    <td class="green">@Html.GetLocalDateTimeSemanticMarkup(item.EndTimeUtc as DateTime?)</td>
                </tr>
            }
            </table>
        } 
        else
        {
            <p>Sorry no events were found.</p>
        }
        </div>
</div>
<!--End Homecontent-->
<div class="clear"></div>